package com.cheli.managerAsset.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.math.BigDecimal;
import java.util.Date;

import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 资产
 * </p>
 *
 * @author cheli
 * @since 2021-03-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="AsAsset对象", description="资产")
public class AsAsset implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "资产ID")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "是否借出")
    private Integer isOut;

    @ApiModelProperty(value = "类别ID")
    private String categoryId;

    @ApiModelProperty(value = "类别父级ID")
    private String categoryParentId;

    @ApiModelProperty(value = "资产名称")
    private String title;

    @ApiModelProperty(value = "资产图片路径")
    private String cover;

    @ApiModelProperty(value = "借出次数")
    private Long count;

    @ApiModelProperty(value = "乐观锁")
    private Long version;

    @ApiModelProperty(value = "状态 Draft未发布  Normal已发布")
    private String status;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "净残值")
    private Integer netSalvage;

    @ApiModelProperty(value = "使用年限")
    private Integer year;

    @ApiModelProperty(value = "原值")
    private BigDecimal price;


    @ApiModelProperty(value = "折旧计算方法")
    private Integer method;

    @TableLogic
    @ApiModelProperty(value = "逻辑删除 1（true）已删除， 0（false）未删除")
    private Integer isDeleted;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private Date gmtCreate;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间")
    private Date gmtModified;

}
